/*
 *    Copyright (c) 2018-2025, waterx All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: waterx
 */

package com.example.tenant.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.tenant.Converter.CustomStringConverter;
import com.example.tenant.Converter.LongStringConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 租户
 *
 * @author waterx
 * @date 2019-05-15 15:55:41
 */
@Data
@ColumnWidth(10)
@EqualsAndHashCode(callSuper = true)
public class SysTenant extends Model<SysTenant> {

    private static final long serialVersionUID = 1L;

    /**
     * 租户id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ExcelProperty(value = "id", converter = LongStringConverter.class)
    private Long id;

    /**
     * 租户名称
     */
    @ExcelProperty("name")
    private String name;

    /**
     * 租户编号
     */
    @ExcelProperty("code")
    private String code;

    /**
     * 租户域名
     */
    @ExcelProperty("tenant_domain")
    private String tenantDomain;

    /**
     * 网站名称
     */
    @ExcelProperty("website_name")
    private String websiteName;

    /**
     * logo
     */
    @ExcelProperty("logo")
    private String logo;

    /**
     * footer
     */
    @ExcelProperty("footer")
    private String footer;

    /**
     * 移动端二维码
     */
    @ExcelProperty("mini_qr")
    private String miniQr;

    /**
     * 登录页图片
     */
    @ExcelProperty("background")
    private String background;

    /**
     * 开始时间
     */
    @ExcelProperty("start_time")
    private Date startTime;

    /**
     * 结束时间
     */
    @ExcelProperty("end_time")
    private Date endTime;

    /**
     * 0正常 9-冻结
     */
    @ExcelProperty("status")
    private String status;

    @ExcelProperty("client_id")
    private String clientId;

    @ExcelProperty("menu_id")
    private String menuId;

    /**
     * 创建人
     */
    @ExcelProperty(value = "create_by", converter = CustomStringConverter.class)
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @ExcelProperty("create_time")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty(value = "update_by", converter = CustomStringConverter.class)
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty("update_time")
    private Date updateTime;

    /**
     * 删除标记
     */

    @TableField(fill = FieldFill.INSERT)
    @ExcelProperty("del_flag")
    private String delFlag;

}
